import re
from django import forms

from apps.operations.models import UserFavorites, CourseComments
from apps.users.models import *
from apps.courses.models import *


# 收藏数据验证
class UserFavForm(forms.ModelForm):
    class Meta:
        model = UserFavorites
        fields = ["fav_id", "fav_type"]


# 评论数据验证
class CommentsForm(forms.ModelForm):
    class Meta:
        model = CourseComments
        fields = ["course", "comments"]


# 个人信息验证
class UserInfoForm(forms.ModelForm):
    class Meta:
        model = UserProfile
        fields = ["nick_name", "gender", "birthday", "address"]